#ifndef _DungeonsListScene_h_
#define _DungeonsListScene_h_

#include "Global.h"




#include "../DungeonsItem.h"

class DungeonsListScene
	: public State
	, public cocos2d::extension::CCBMemberVariableAssigner
	, public cocos2d::extension::CCBSelectorResolver
	, public cocos2d::extension::CCNodeLoaderListener
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(DungeonsListScene, create);

	DungeonsListScene(void);
	~DungeonsListScene(void);

	virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::CCObject * pTarget, cocos2d::CCString * pSelectorName);
	virtual SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::CCObject * pTarget, cocos2d::CCString * pSelectorName);
	virtual bool onAssignCCBMemberVariable(cocos2d::CCObject * pTarget, cocos2d::CCString * pMemberVariableName, cocos2d::CCNode * pNode);
	virtual void onNodeLoaded(cocos2d::CCNode * pNode, cocos2d::extension::CCNodeLoader * pNodeLoader);

	bool init();
	void refresh();
	void onEnter();
	void onExit();
private:
	CCMenuItemImage* mReturn;
	CCMenuItemImage* mNextBtn;
	CCMenuItemImage* mLastBtn;
	CCLabelTTF* mPageCount;
	CCScrollView* mScrollView;
	CCLayer* mContent;
	virtual void menuReturnCallback(CCObject* pSender);
};

#endif